package com.education.wisdom.service.impl;


import com.education.common.utils.Convert;
import com.education.wisdom.mapper.AnswersMapper;
import com.education.wisdom.pojo.Answers;
import com.education.wisdom.pojo.SysAppLogin;
import com.education.wisdom.service.IAnswersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 答卷 服务层实现
 *
 * @author ruoyi
 * @date 2018-11-13
 */
@Service
public class AnswersServiceImpl implements IAnswersService {
    @Autowired
    private AnswersMapper answersMapper;

    /**
     * 查询答卷信息
     *
     * @param djId 答卷ID
     * @return 答卷信息
     */
    @Override
    public Answers selectAnswersById(String djId) {
        return answersMapper.selectAnswersById(djId);
    }



    /**
     * 查询答卷列表
     *
     * @param answers 答卷信息
     * @return 答卷集合
     */
    @Override
    public List<Answers> selectAnswersList(Answers answers) {
        return answersMapper.selectAnswersList(answers);
    }

    @Override
    public List<Answers> selectAnswersList1(Answers answers) {
        return answersMapper.selectAnswersList(answers);
    }

    /**
     * 新增答卷
     *
     * @param answers 答卷信息
     * @return 结果
     */
    @Override
    public int insertAnswers(Answers answers) {
        return answersMapper.insertAnswers(answers);
    }

    /**
     * 修改答卷
     *
     * @param answers 答卷信息
     * @return 结果
     */
    @Override
    public int updateAnswers(Answers answers) {
        return answersMapper.updateAnswers(answers);
    }

    /**
     * 删除答卷对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAnswersByIds(String ids) {
        return answersMapper.deleteAnswersByIds(Convert.toStrArray(ids));
    }

    @Override
    public List<Answers> selectAnswersListById(Map<String, Object> map) {
        return answersMapper.selectAnswersListById(map);
    }

    @Override
    public List<SysAppLogin> selectAnswersUsers(Integer djPaperid) {
        return answersMapper.selectAnswersUsers(djPaperid);
    }

    @Override
    public Answers selectByPaperId(Map<String,Object> map) {
        return answersMapper.selectByPaperId(map);
    }

    @Override
    public List<Answers> selectByPaperId3(Map<String, Object> map) {
        return answersMapper.selectByPaperId3(map);
    }

    @Override
    public List<Answers> selectByPaperId1(Integer djPaperid) {
        return answersMapper.selectByPaperId1(djPaperid);
    }

    @Override
    public List<Answers> selectByPaperId2(Answers answers) {
        return answersMapper.selectByPaperId2(answers);
    }

    @Override
    public String[] selectByIds(String[] split) {
        return answersMapper.selectByIds(split);
    }
}
